@using MissionControl
@using Unity.ClusterDisplay.MissionControl.EngineeringUI.Components

<RadzenTemplateForm TItem="AssetPost" Data=@Asset Submit=@OnOk class="h-100">
    <RadzenStack Orientation="Orientation.Vertical" JustifyContent="JustifyContent.SpaceBetween">
        <RadzenStack Orientation="Orientation.Vertical" Gap="0">
            <RadzenText Text="Name" />
            <RadzenTextBox Name="AssetName" @bind-Value=@Asset.Name />
            <RadzenRequiredValidator Component="AssetName" Text="Name is required" />
            <RadzenText Text="Description" />
            <RadzenTextArea @bind-Value=@Asset.Description />
            <RadzenStack Orientation="Orientation.Horizontal" AlignItems="AlignItems.Center" Gap="1rem">
                <RadzenText Text="URL" />
                <ParameterHelp Icon="help" HelpText="This URL has to be accessible from the MissionControl server" />
            </RadzenStack>
            <RadzenTextBox Name="URL" @bind-Value=@Asset.Url />
            <RadzenRequiredValidator Component="URL" Text="URL is required" />
        </RadzenStack>
    </RadzenStack>
    <RadzenStack Orientation="Orientation.Horizontal" class="text-end" JustifyContent="JustifyContent.End">
        <RadzenButton Text="Cancel" Click=OnCancel ButtonStyle="ButtonStyle.Light" Style="width: 120px" />
        <RadzenButton Text="Add" ButtonType="ButtonType.Submit" ButtonStyle="ButtonStyle.Info"
                      Style="width: 120px; margin-left:24px;" />
    </RadzenStack>
</RadzenTemplateForm>
